package org.fatewa.engine.design.advice;

import org.fatewa.engine.advice.protocol.RayquazaResponse;
import org.fatewa.engine.config.BuiltinExceptionProcessorConfig;

/**
 * 提供一个异常处理的标准机制，用户可以通过指定泛型(异常类型)
 * 进行相对应的处理
 *
 * @author 4everlynn
 * @see BuiltinExceptionProcessorConfig
 */
public abstract class AbstractExceptionProcessor<E extends Exception> {
    /**
     * 将异常转换为 RayquazaResponse
     *
     * @param e 异常
     * @return RayquazaResponse
     */
    public abstract RayquazaResponse map(E e);
}
